package initialize

import (
	"github.com/gin-gonic/gin"
	"init-database/router"
	"net/http"
)

func Routers() *gin.Engine {
	r := gin.New()

	routerGroup := router.RouterGroupApp
	{
		routerGroup.InitInitRouter(r)
	}

	baseRouter := r.Group("/api")
	{
		baseRouter.POST("/ping", func(c *gin.Context) {
			c.JSON(http.StatusOK, gin.H{
				"code":    http.StatusOK,
				"message": "pong",
			})
		})

	}
	return r
}
